home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 2 / CU Amiga Magazine's Super CD-ROM 02 (1996)(EMAP Images)(GB)[!][issue 1996-04].iso / magazine / amiga_e / amigae.sept.archive / 000010_crash!fwi.uva.nl!oortmers_Wed, 1 Sep 93 15:22:00 PST.msg < prev    next >
Text File  |  1993-11-02  |  3KB  |  81 lines

  1. Received: by bkhouse.cts.com (V1.16/Amiga)
  2.     id AA00000; Wed, 1 Sep 93 15:22:00 PST
  3. Received: from mail.fwi.uva.nl by crash.cts.com with smtp
  4.     (Smail3.1.28.1 #18) id m0oY0Mc-0000LqC; Wed, 1 Sep 93 15:09 PDT
  5. Received: from gene.fwi.uva.nl by mail.fwi.uva.nl with SMTP (5.65c/5.1)
  6.           id AA20866; Thu, 2 Sep 1993 00:09:05 +0200
  7. Received: by gene.fwi.uva.nl
  8.           id AA18772; Thu Sep  2 00:09:03 1993
  9. Message-Id: <199309012209.AA18772@gene.fwi.uva.nl>
  10. Date: Thu, 2 Sep 1993 00:09:03 +0200
  11. Return-Path: <oortmers@fwi.uva.nl>
  12. X-Organisation: Faculty of Mathematics & Computer Science
  13.                 University of Amsterdam
  14.                 Plantage Muidergracht 24
  15.                 NL-1018 TV Amsterdam
  16.                 The Netherlands
  17. X-Phone:        +31 20 525 5200
  18. X-Telex:        16460 facwn nl
  19. X-Fax:          +31 20 525 5101
  20. From: oortmers@fwi.uva.nl (Wouter van Oortmerssen (Alfa_Inf92))
  21. To: AmigaE@bkhouse.cts.com
  22. Subject: MUI and domethod()
  23.  
  24.  
  25. >> Wouter!
  26.  
  27. hello! :-)
  28.  
  29. >>     First off, I want to take the time to thank you for converting the C
  30. >> header into a useable form in E (nice thinkin! I wouldn't have come up with
  31. >> a work-around like that :-)...it must have taken a while.
  32.  
  33. no, actually not. Those includes are generated automatically. I just told
  34. stefan how to do it, and then he added it to his MUI system.
  35.  
  36. >>     Secondly, I present to you (and everybody else) a problem: MUI relies
  37. >> HEAVILY on the Amiga.lib function DoMethod.  This is what makes it so you
  38. >> can connect one object to another, and have them talk to each other. Since
  39. >> it is an Amiga.lib function, does this mean there is no way to use MUI until
  40. >> there is a new EC (2.5) with some Amiga.lib functions? Or is there a way I
  41. >> can do it _now_ ? (If I seem impatient, its because I go back to school in
  42. >> ten days! :-( So I have _very_ little time to experiment)
  43. >> 
  44. >>     So, it seems that for right now, the includes are un useable.
  45.  
  46. one simply needs a suitable domethod() for E:
  47.  
  48.  
  49. MODULE 'intuition/classes', 'utility/hooks', 'intuition/classusr'
  50.  
  51. /* example call: domethod(myobj,[METHODID,...]) */
  52.  
  53. PROC domethod(obj:PTR TO object,msg:PTR TO msg)
  54.   DEF h:PTR TO hook,o:PTR TO object,dispatcher
  55.   IF obj
  56.     o:=obj-SIZEOF object     /* instance data is to negative offset */
  57.     h:=o.class
  58.     dispatcher:=h.entry      /* get dispatcher from hook in iclass */
  59.     MOVE.L h,A0
  60.     MOVE.L msg,A1
  61.     MOVE.L obj,A2            /* probably should use CallHookPkt, but the */
  62.     MOVE.L dispatcher,A3     /*   original code (DoMethodA()) doesn't. */
  63.     JSR (A3)                 /* call classDispatcher() */
  64.     MOVE.L D0,o
  65.     RETURN o
  66.   ENDIF
  67. ENDPROC NIL
  68.  
  69.  
  70. this probably will be in modules also by v2.5, but for now it might help.
  71. NOTE: I just hacked this together from a amiga.lib disassembly, and haven't
  72. been able to test it yet, so just try it, and report any problems...
  73.  
  74. It's beyond me why commodore has put DoMethodA() in amiga.lib
  75.  
  76. Wouter
  77.  
  78.    ____  Wouter van Oortmerssen, Wouter@alf.let.uva.nl
  79.   / __/  "Einen Satz verstehen, heisst, wissen was der Fall ist,
  80.  / __/    wenn er wahr ist" - Wittgenstein
  81. /___/  ->subscribe to the E mailing list: amigae-request@bkhouse.cts.com<-